package com.song.estore.domain;

import java.sql.Timestamp;

/**
 * Created by 范姣姣 on 2015/10/22.
 */
public class Orders {
    private String id;
    private double totalprice;
    private String receiverinfo;
    private int paystate;
    private Timestamp createtime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public double getTotalprice() {
        return totalprice;
    }

    public void setTotalprice(double totalprice) {
        this.totalprice = totalprice;
    }

    public String getReceiverinfo() {
        return receiverinfo;
    }

    public void setReceiverinfo(String receiverinfo) {
        this.receiverinfo = receiverinfo;
    }

    public int getPaystate() {
        return paystate;
    }

    public void setPaystate(int paystate) {
        this.paystate = paystate;
    }

    public Timestamp getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Timestamp createtime) {
        this.createtime = createtime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Orders orders = (Orders) o;

        if (Double.compare(orders.totalprice, totalprice) != 0) return false;
        if (paystate != orders.paystate) return false;
        if (id != null ? !id.equals(orders.id) : orders.id != null) return false;
        if (receiverinfo != null ? !receiverinfo.equals(orders.receiverinfo) : orders.receiverinfo != null)
            return false;
        if (createtime != null ? !createtime.equals(orders.createtime) : orders.createtime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result;
        long temp;
        result = id != null ? id.hashCode() : 0;
        temp = Double.doubleToLongBits(totalprice);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        result = 31 * result + (receiverinfo != null ? receiverinfo.hashCode() : 0);
        result = 31 * result + paystate;
        result = 31 * result + (createtime != null ? createtime.hashCode() : 0);
        return result;
    }
}
